package com.irdstudio.bsp.executor.core.assembly.etl.conf;
/**
 * @docRoot:
 * 	全局配置文件对应的存放类,全部使用静态变量,供全局使用
 * @author 李广明
 * @version 1.0
 * Modify
 * 	2006-05-27 cky 增加智能抽取存放信息部分
 *
 */
public class GlobalConf {
	//智能抽取存放信息
	private static String RAR_FILE_PATH		= null; //导入增量文件时,指定压缩包文件所在位置,使用如下配置
	private static String RAR_BAK_PATH_TMP	= null;	//临时备份增量文件路径，指定位置
	private static String RAR_DECOMP_CMD		= null; //解压缩命令
	private static String RAR_MOVE_CMD		= null; //移动文件命令
	
	//定义存放目录信息的静态变量,
	private static String ROOT_PATH 		= null;		//指定etl所有的根目录路径
	private static String FILE_PATH		= null;		//指定需导入的文件的所在路径
	private static String BACKUP_PATH	= null;		//指定备份文件所存放的路径
	private static String LOG_PATH		= null;		//指定日志文件所存放的路径
	private static String TABLECONF_PATH = null;		//表配置文件所在的目录
	
	//定义用于存放连接信息的配置
	private static String CONN_CLASSNAME = null;		//连接所用到的类
	private static String CONN_URL		= null;		//URL
	private static String CONN_USER		= null;		//用于连接数据库的用户名
	private static String CONN_PASS		= null;		//用于连接数据库的密码
	private static int CONN_MIN			= 5;		//最小连接数(默认值)
	private static int CONN_MAX			= 10;		//最大连接数(默认值)
	private static boolean START_ON_INIT = true;		//是否在初始化的时候就初始化连接池 
	
	//配置用于ftp服务器的信息
	private static String FTP_IP			= null;		//ftpIP
	private static String FTP_USER		= null;		//用于连接ftp的密码
	private static String FTP_PASS		= null;		//用于连接ftp的密码
	private static String FTP_PATH		= null;		//ftp归档目录
	
	//有关于各操作系统的区别,而作的配置
	private static String PATH_SEPARATOR	= "\\";		//路径描述符号,windows为\,unix中为/
	
	//与性能相关的一些配置
	private static boolean CHECK_CONTENT = false;	//是否检查数据内容
	
	//一些开关选项
	private static boolean CHECK_MODE	= false;	//表明是否使用检查数据模式运行
	private static boolean IS_BACKUP		= false;	//是否备份源文件
	
	//指定程序运行间隔
	private static int INTERVAL=-1;					//指定程序运行强制时间间隔，可以不指定
	
	//指定数据库的编码方式
	private static String CHAR_SET	= null;
	
	//指定整个流程中是否使用事务
	private static boolean isAllOnTrans=false;
	
	//指定是否在月末表处理中使用事务机制（鉴于实际情况，一般为不使用，但需人工保持数据完整）
	private static boolean isOnTrans = false;

	public static void setIsAllOnTrans(Boolean isAllOnTrans) {
		GlobalConf.isAllOnTrans = isAllOnTrans;
	}
	
	public static void setIsOnTrans(Boolean isOnTrans) {
		GlobalConf.isOnTrans = isOnTrans;
	}
	
	public static void setRAR_FILE_PATH(String rAR_FILE_PATH) {
		RAR_FILE_PATH = rAR_FILE_PATH;
	}

	public static void setRAR_BAK_PATH_TMP(String rAR_BAK_PATH_TMP) {
		RAR_BAK_PATH_TMP = rAR_BAK_PATH_TMP;
	}

	public static void setRAR_DECOMP_CMD(String rAR_DECOMP_CMD) {
		RAR_DECOMP_CMD = rAR_DECOMP_CMD;
	}

	public static void setRAR_MOVE_CMD(String rAR_MOVE_CMD) {
		RAR_MOVE_CMD = rAR_MOVE_CMD;
	}

	public static void setROOT_PATH(String rOOT_PATH) {
		ROOT_PATH = rOOT_PATH;
	}

	public static void setFILE_PATH(String fILE_PATH) {
		FILE_PATH = fILE_PATH;
	}

	public static void setBACKUP_PATH(String bACKUP_PATH) {
		BACKUP_PATH = bACKUP_PATH;
	}

	public static void setLOG_PATH(String lOG_PATH) {
		LOG_PATH = lOG_PATH;
	}

	public static void setTABLECONF_PATH(String tABLECONF_PATH) {
		TABLECONF_PATH = tABLECONF_PATH;
	}

	public static void setCONN_CLASSNAME(String cONN_CLASSNAME) {
		CONN_CLASSNAME = cONN_CLASSNAME;
	}

	public static void setCONN_URL(String cONN_URL) {
		CONN_URL = cONN_URL;
	}

	public static void setCONN_USER(String cONN_USER) {
		CONN_USER = cONN_USER;
	}

	public static void setCONN_PASS(String cONN_PASS) {
		CONN_PASS = cONN_PASS;
	}

	public static void setCONN_MIN(int cONN_MIN) {
		CONN_MIN = cONN_MIN;
	}

	public static void setCONN_MAX(int cONN_MAX) {
		CONN_MAX = cONN_MAX;
	}

	public static void setSTART_ON_INIT(boolean sTART_ON_INIT) {
		START_ON_INIT = sTART_ON_INIT;
	}

	public static void setFTP_IP(String fTP_IP) {
		FTP_IP = fTP_IP;
	}

	public static void setFTP_USER(String fTP_USER) {
		FTP_USER = fTP_USER;
	}

	public static void setFTP_PASS(String fTP_PASS) {
		FTP_PASS = fTP_PASS;
	}

	public static void setFTP_PATH(String fTP_PATH) {
		FTP_PATH = fTP_PATH;
	}

	public static void setPATH_SEPARATOR(String pATH_SEPARATOR) {
		PATH_SEPARATOR = pATH_SEPARATOR;
	}

	public static void setCHECK_CONTENT(boolean cHECK_CONTENT) {
		CHECK_CONTENT = cHECK_CONTENT;
	}

	public static void setCHECK_MODE(boolean cHECK_MODE) {
		CHECK_MODE = cHECK_MODE;
	}

	public static void setIS_BACKUP(boolean iS_BACKUP) {
		IS_BACKUP = iS_BACKUP;
	}

	public static void setINTERVAL(int iNTERVAL) {
		INTERVAL = iNTERVAL;
	}

	public static void setCHAR_SET(String cHAR_SET) {
		CHAR_SET = cHAR_SET;
	}

	public static void setAllOnTrans(boolean isAllOnTrans) {
		GlobalConf.isAllOnTrans = isAllOnTrans;
	}

	public static void setOnTrans(boolean isOnTrans) {
		GlobalConf.isOnTrans = isOnTrans;
	}

	public static String getRAR_FILE_PATH() {
		return RAR_FILE_PATH;
	}

	public static String getRAR_BAK_PATH_TMP() {
		return RAR_BAK_PATH_TMP;
	}

	public static String getRAR_DECOMP_CMD() {
		return RAR_DECOMP_CMD;
	}

	public static String getRAR_MOVE_CMD() {
		return RAR_MOVE_CMD;
	}

	public static String getROOT_PATH() {
		return ROOT_PATH;
	}

	public static String getFILE_PATH() {
		return FILE_PATH;
	}

	public static String getBACKUP_PATH() {
		return BACKUP_PATH;
	}

	public static String getLOG_PATH() {
		return LOG_PATH;
	}

	public static String getTABLECONF_PATH() {
		return TABLECONF_PATH;
	}

	public static String getCONN_CLASSNAME() {
		return CONN_CLASSNAME;
	}

	public static String getCONN_URL() {
		return CONN_URL;
	}

	public static String getCONN_USER() {
		return CONN_USER;
	}

	public static String getCONN_PASS() {
		return CONN_PASS;
	}

	public static int getCONN_MIN() {
		return CONN_MIN;
	}

	public static int getCONN_MAX() {
		return CONN_MAX;
	}

	public static boolean isSTART_ON_INIT() {
		return START_ON_INIT;
	}

	public static String getFTP_IP() {
		return FTP_IP;
	}

	public static String getFTP_USER() {
		return FTP_USER;
	}

	public static String getFTP_PASS() {
		return FTP_PASS;
	}

	public static String getFTP_PATH() {
		return FTP_PATH;
	}

	public static String getPATH_SEPARATOR() {
		return PATH_SEPARATOR;
	}

	public static boolean isCHECK_CONTENT() {
		return CHECK_CONTENT;
	}

	public static boolean isCHECK_MODE() {
		return CHECK_MODE;
	}

	public static boolean isIS_BACKUP() {
		return IS_BACKUP;
	}

	public static int getINTERVAL() {
		return INTERVAL;
	}

	public static String getCHAR_SET() {
		return CHAR_SET;
	}

	public static boolean isAllOnTrans() {
		return isAllOnTrans;
	}

	public static boolean isOnTrans() {
		return isOnTrans;
	}
	
}
